<template>
	<view class="wap">
		<navbar :parameter='parameter'></navbar>
		<view class="box">
			<view class="title">{{detail.title}}</view>
			<view class="time"> {{detail.createtime}} </view>
			<view class="content">
				<u-parse :content="detail.content"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				parameter: {
					'navbar': '1',
					'return': '1',
					'title': '平台动态',
					'color': true,
					'class': 'on'
				},
				detail: {}
			};
		},
		onLoad(option) {
			console.log(option)
			this.info(option.id);

		},
		onShow() {

		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {
		
		},
		onShareTimeline(res) { //分享到朋友圈
		
		},
		methods: {
			async info(id) {
				const res = await this.$myRequest({
					url: '/api/notice/info',
					data: {
						openid: uni.getStorageSync('openid'),
						id: id
					}
				})
				console.log(res.data.data)
				this.detail = res.data.data;
			},
		}
	}
</script>

<style lang="scss">
	.wap {
		padding: 30rpx;
	}

	.box {
		padding: 30rpx;
		background-color: #fff;
		border-radius: 12rpx;
	}

	.wap .time {
		font-size: 24rpx;
		color: #C2C2C2;
		padding-bottom: 20rpx;

	}


	.wap .title {
		font-size: 32rpx;
		color: #333;
		font-weight: 700;
		line-height: 1.6;
		margin-bottom: 10rpx;
	}

	.wap .content {
		border-top: 1px solid #F4F3F5;
		padding-top: 20rpx;
	}
</style>
